package com.study.design.decorator.example;

/**
 * 抽象装饰类型
 */
public abstract class PancakeDecorator extends Pancake {
    private Pancake pancake = null;

    /**
     * 通过构造函数传递被修饰者
     *
     * @param pancake
     */
    public PancakeDecorator(Pancake pancake) {
        this.pancake = pancake;
    }

    @Override
    public String getMsg() {
        return this.pancake.getMsg();
    }

    @Override
    public Integer getPrice() {
        return this.pancake.getPrice();
    }
}
